import pandas as pd
import numpy as np
import math
import glob
from tqdm import tqdm


import sys
# sys.path.append("./")
# sys.path.append("./util")


from util.ply import read_ply

ply_file_path = "H:/osdata/STPLS3D/Synthetic_v3/1_points_GTv3.ply"
txt_file_path = "H:/osdata/STPLS3D/Synthetic_v3/1_points_GTv3.txt"
data = read_ply(ply_file_path)
pointsize = data.shape[0]
head_str = str(data.dtype.names)

np.savetxt(txt_file_path,data,delimiter=',',header=head_str)
# with open(txt_file_path,'r') as file:
#     file.write(head_str + "\n")
#     for row in range(pointsize):



# ply_file_path = "H:/osdata/STPLS3D/Synthetic_v3/1_points_GTv3.ply"